﻿using System;

namespace FBGraph.Controllers
{
    public partial class CommentsController
    {
        /// <summary>Adds a comment to the Graph API object specified by <paramref name="id" />.</summary>
        /// <param name="id">The Graph API identifier of the object being commented on.</param>
        /// <param name="message">The body of the comment.</param>
        /// <returns>The identifier of the comment that was added.</returns>
        public Object Create(Object id, String message)
        {
            var args = new FBArgs { { "message", message } };
            var result = Context.Post(id, "comments", args);

            return result.Id;
        }
    }
}